import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'

import '@icon-park/vue-next/styles/index.css'
import 'prosemirror-view/style/prosemirror.css'
import 'animate.css'
import '@/assets/styles/prosemirror.scss'
import '@/assets/styles/global.scss'
import '@/assets/styles/font.scss'

import Icon from '@/plugins/icon'
import Directive from '@/plugins/directive'

import locales from '@/lang/index'
import i18next from 'i18next'
import I18NextVue from 'i18next-vue'

i18next.init({
  lng: 'zh',
  fallbackLng: 'zh',
  resources: {
    en: { translation: locales.en },
    zh: { translation: locales.zh },
  },
})

const app = createApp(App)
app.use(Icon)
app.use(Directive)
app.use(I18NextVue, {i18next})
app.use(createPinia())
app.mount('#app')
